<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        function ss() {
            let n = +prompt("请输入一个数")
            if (n == 1 || n == 2 || n == 3 || n == 5 || n == 7) {
                return alert("素数")
            } else if (n % 2 == 0 || n % 3 == 0 || n % 5 == 0 || n % 7 == 0) {
                return alert("合数")
            } else {
                return alert("素数")
            }
        }ss()
    </script>
</body>

</html>